# -*- coding:utf-8 -*-
import math

def my_abs(x):
    if not isinstance(x,(int,float)):
        raise TypeError('bad operate Error')
    if x >= 0:
        return x
    else:
        return -x

def nop():
    pass


def move(x, y, step, angle=0):
    nx = x + step * math.cos(angle)
    ny = y - step * math.sin(angle)
    return nx,ny

def power(x, n=2):
    s = 1
    while n > 0:
        n = n - 1
        s = s * x
    return s


print power(2,2)
print power(5,3)
print power(10)
